import {Component, OnInit} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {HomeService} from '../../../shared/service/home.service';

@Component({
  selector: 'app-hot',
  templateUrl: './hot.component.html',
  styleUrls: ['./hot.component.scss']
})
export class HotComponent implements OnInit {
  articles;

  constructor(private http: HttpClient, private homeService: HomeService) {
  }


  ngOnInit() {
    this.homeService.getHotArticles().subscribe((res) => {
      this.articles = res;
    });
  }

}
